<?php

/**
 * 微信相关路由
 * Class wxJumper
 */
    class wxJumper{
        static function get_url($str){
            return WEIXIN_ROUTE."?".$str;
        }
        
        static function get_url_weixin_auth2($str){
            return $url="https://open.weixin.qq.com/connect/oauth2/authorize?appid=".WEIXIN_APPID."&redirect_uri=".urlencode(self::get_url($str))."&response_type=code&scope=snsapi_userinfo&state=2&connect_redirect=1#wechat_redirect";
        }
        
        static function change_cache($filename=0){
            if($filename){
                return "?".filemtime($filename);
            }
            else{
                return "?".time();
            }
        }
    }